<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="common/head :: head(links)"/>
<body>
<div id="app"  v-cloak>
    <template>
            <Checkbox v-for="item in parkIdList" :label="item.parkId" :key="item.parkId" ref="checkboxGroup">
                <span>{{item.name}}</span>
            </Checkbox>
    </template>

</div>
<div th:replace="common/foot :: foot(script)"></div>
<script type="text/javascript">
    var vm = new Vue({
        el: '#app',
        data:{
            okUtils:null,
            okLayer:null
        },
        methods: {
            load:function () {
                layui.use(["okUtils"], function () {
                    okUtils = layui.okUtils;
                    okLayer = layui.okLayer;
                    okUtils.ajaxCloud({
                        url:"/app/park/select",
                        // param : vm.user,
                        close : false,
                        success : function(result) {
                            vm.entity.parkIdList = result.msg;
                            console.log(vm.entity.parkIdList);
                        }
                    });
                });
            },
            acceptClick : function(dialog){
                vm.okUtils.ajaxCloud({
                    url:"/sys/user/selectPack",
                    param : vm.entity,
                    json:true,
                    success : function(result) {
                        vm.okLayer.msg.greenTick(result.msg)
                        dialog.load();
                    }
                });
            },
        },
        created: function() {

        }
    });
</script>
</body>
</html>